from django.core.files.storage import Storage

from meiduo_mall import settings


class FastDFSStorage(Storage):
    """自定义文件存储系统"""

    def __init__(self, fdfs_base_url=None):

        self.fdfs_base_url = fdfs_base_url or settings.FDFS_BASE_URL


    def url(self, name):

        return self.fdfs_base_url + name